package com.caih.contacts.entity;

import lombok.Data;
import javax.persistence.*;

@Data
@Entity
@Table(name="employees_info")
public class Employees {

    @Id
    private String userid;
    @Column(name="name")
    private String name;
    @Column(name = "department")
    private String department;
    @Column(name = "mobile")
    private String mobile;
    @Column(name = "email")
    private String email;
    @Column(name = "address")
    private String address;
    @Column(name = "gender")
    private String gender;
    @Column(name = "orders")
    private Integer orders;
    @Column(name = "is_leader_in_dept")
    private String is_leader_in_dept;
    @Column(name = "enable")
    private String enable="1";

    public String toString(){
        return "{"+"\"userid\":"+"\""+userid+"\""+","
                +"\"name\":"+"\""+name+"\""+","
                +"\"department\":"+"["+department+"]"+","
                +"\"mobile\":"+"\""+mobile+"\""+","
                +"\"email\":"+"\""+email+"\""+","
                +"\"address\":"+"\""+address+"\""+","
                +"\"gender\":"+"\""+gender+"\""+","
                +"\"orders\":"+"\""+orders+"\""+","
                +"\"is_leader_in_dept\":"+"["+is_leader_in_dept+"]"+","
                +"\"enable\":"+"\""+enable+"\""
                +"}";
    }
}
